<#include "user_manager_header.ftl">

<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">开放平台</h3>
	</div>
	<div class="panel-body">
		<ul class="nav nav-tabs">
			<li><a href="user_management_list">管理管理员用户</a></li>
			<li class="active"><a>添加管理员</a></li>
		</ul>
		<div>
			<p></p>
		</div>

		<div class="panel panel-default">
			<div class="panel-body">

				<form class="form-horizontal" role="form" id="form" method="post"
					action="user_add_exe">

					<div class="form-group">
						<div class="col-sm-6">
							<input type="hidden" class="form-control"
								value="${readonly?if_exists}" name="readonly" id="readonly" />
							<input type="hidden" class="form-control"
								value="${(user.userCode)?if_exists}" name="usercode"
								id="usercode" placeholder="用户编码" required autofocus />
						</div>
					</div>

					<div class="form-group">
						<label for="username" class="col-sm-2 control-label">用户姓名</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(user.userName)?if_exists}" name="username"
								id="username" placeholder="用户姓名" required />
						</div>
					</div>

					<div class="form-group">
						<label for="usermobile" class="col-sm-2 control-label">用户手机号</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(user.userMobile)?if_exists}" name="usermobile"
								id="usermobile" placeholder="用户手机号" required />
						</div>
					</div>

					<div class="form-group">
						<label for="userUID" class="col-sm-2 control-label">登陆账号</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(user.userUID)?if_exists}" name="userUID" id="userUID"
								placeholder="登陆账号" required />
						</div>
					</div>

					<div class="form-group">
						<label for="userpass" class="col-sm-2 control-label">登陆密码</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(user.userPass)?if_exists}" name="userpass"
								id="userpass" placeholder="登陆密码" required />
						</div>
					</div>

					<div class="form-group">
						<label for="userlogourl" class="col-sm-2 control-label">用户头像地址</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(user.userLogoURL)?if_exists}" name="userlogourl"
								id="userlogourl" placeholder="用户头像地址"  />
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-default" id="button"
								${(user.userCode)?if_exists}>提交</button>
						</div>
					</div>
				</form>

			</div>
			<!--/panel-body-->

		</div>
		<div class="panel-footer"></div>
	</div>

	<blockquote>
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
			Integer posuere erat a ante.</p>
		<footer>Luther</footer>
	</blockquote>

	<#include "user_manager_footer.ftl">

	<script type="text/javascript">
		$().ready(function() {
			$('.selectpicker').selectpicker();
			if (document.getElementById("readonly").value == "UPDATE") {

				document.getElementById("usercode").readOnly = true;
				document.getElementById("userUID").readOnly = true;
				document.getElementById("userpass").readOnly = true;
			}

			$("#button").click(function() {

			});

		});
	</script>